-----------------------
filename = "View3D.txt"
-----------------------

I.    COPYRIGHT AND LICENSE
II.   WHAT IS "View3D"
III.  THE View3D SCREEN
IV.   WORKING THE View3D CONTROLS
V.    MORE INFORMATION


I.    COPYRIGHT AND LICENSE

View3D is copyright Tomas j. Nally, September 2003.  My email address is Steelweaver52@aol.com.

View3D is released as open source.



II.   WHAT IS "View3D"

View3D is a Liberty BASIC program which plots 3D wire-frame objects.  The primary asset of View3D is that the selection of camera position is accomplished by moving mouse-controlled sliders.  One 2D slider control selects the X and Z position of the camera simultaneously.  A single-dimension slider control selects the Y position of the camera.  A third slider provides a zoom control for the objects.

The cool thing about View3D is that the image is updated instantly and smoothly as the slider controls are operated.  The user has the experience of rapidly moving around the objects to view them from different positions.  Give it a try!

View3D was written to demonstrate the capabilities of two user-defined functions, ScreenX() and ScreenY().  These functions take as input the 3 coordinates of a point in space, and output two coordinates when the point is projected onto a 2D plane.  Thus, ScreenX() and ScreenY() allow the plotting of 3D graphics.


III.  THE View3D SCREEN

Here are the components of the View3D screen:

** The large graphic box on the right (taking up most of the screen real estate) is the main plot box.  The 3D image in this GraphicBox is continually  updated as the user works the controls.

** The GraphicBox in the upper left hand corner is used to control the X and Z positions of the camera.  Think of this as a "2D slider" control.  Plotted within this GraphicBox is a very tiny PLAN view of the 3D objects.  This control features a BLUE crosshair, with a small blue box at the intersection of the crosshairs.

** The GraphicBox occupying the center left is used to control the Y position of the camera.  Think of this as a "vertical slider" control.  Plotted within this GraphicBox is a very tiny ELEVATION view of the 3D objects.  This control also features a horizontal green line with a small green box in the center of the line.

** The GraphicBox occupying the lower left is used for Scale or Scalefactor control.  Think of it as a horizontal slider control.  This control has a ruler, and a small dark red box capable of being slid from side-to-side.

** Below the main plot box you will see buttons to clear the main screen, redraw the screen, and invoke Help (which opens this text file).  Another button quits the application.


IV.   WORKING THE View3D CONTROLS

IMPORTANT.  One helpful point to remember when working the controls is this: controls are not activated by holding down the left button and dragging the mouse.  Rather, controls are activated by left-clicking once, and releasing the left mouse button, then moving the mouse pointer.  The control will move with the mouse pointer until the control is "released" by a single right click of the mouse.  This applies to all three slider controls.

**  Move the mouse pointer to the XZ control and left-click once within the small blue square.  The blue square attaches to the mouse pointer.  Move the small blue square slowly around and near the perimeter of the GraphicBox.  Watch how the image changes in the large GraphicBox.  In the XZ control, as you move the camera closer to the tiny plotted objects, the view in the large GraphicBox changes accordingly.  Right-click once to release the XZ control.

**  Now, move the mouse pointer to the Y elevation control, which is the center GraphicBox on the left hand side.  Left-click once within the green square.  The green square and the green line will now move up and down with the mouse pointer.  Notice how the image in the large GraphicBox changes.  Right-click once to release Y elevation control.

**  Next, move the mouse pointer to the Scale control in the lower left hand corner.  Left-click once within the dark red box.  The box will move left and right with the mouse pointer.  As the box moves to the right, the Scale Factor increases, and the image plots larger.  As the box moves to the left, the Scale Factor decreases, and the image plots smaller.  Right-click once to release the Scale control.


V.    MORE INFORMATION

As indicated above, View3D was written to showcase the two user-defined functions, ScreenX() and ScreenY().  To obtain the source code for these functions, search within the source code of View3D, which is an open source program.

To read more about the arguments required by ScreenX() and ScreenY(), see the article titled "Easy Functions for Plotting 3D Objects" in Issue 113 of the Liberty BASIC newsletter.  The Liberty BASIC newsletter series is available at http://babek.info/libertybasicfiles/lbnews/index.html.

The Liberty BASIC application can be downloaded at http://www.libertybasic.com.



------------end of "View3D.txt"---------------------

